home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 1.iso / tools / texture_utils / q2towad.txt < prev    next >
Text File  |  1998-01-25  |  7KB  |  192 lines

  1. Updated: January 25, 1998
  2. =====================================================================
  3. Title                   : Q2toWad
  4. Filenames               : q2towad.exe, q2pal.lmp
  5. Version                 : 1.3
  6.  
  7. Author                  : Tim Wright
  8. Net Nick                : Argh!
  9. Email Address           : argh@ntplx.net
  10. WWW                     : yeah, still workin on it... ;)
  11.  
  12. Description             : Utility to extract Quake2 wal textures 
  13.                           from a pak into a specfied number of wad2 
  14.                           files.
  15.                           * Includes the ability to convert to a new 
  16.                             palette, like for Quake or Hexen2
  17.                           * Can include Quake2 dir names in textures
  18.                             so that most any editor can compile the
  19.                             level for Quake2
  20.                           * Works on any standard Quake2 pak files
  21.  
  22. Requirements            : A Win32 operating system, about twice the
  23.                           HD space that the textures take up (around 
  24.                           35Mb for Quake2's pak)
  25.  
  26. Additional Credits to   : id Software for Quake and Quake2, Mattias 
  27.                           "Preacher" Konradsson and David "Kevlar"
  28.                           Kelvin for help with testing, the 
  29.                           Unofficial Quake Specs at:
  30.           http://www.gamers.org/dEngine/quake/spec/quake-spec32.html,
  31.                           and everyone who sent me constructive
  32.                           feedback.
  33.  
  34. Other Works by Author   : ArghLite - enhanced bsp lighting utility
  35.  
  36. =====================================================================
  37. * Usage *
  38.  
  39. Put q2towad.exe and q2pal.lmp in the same dir as the Quake2 pak0.pak 
  40. and run the executable with whatever options you wish.
  41.  
  42. Remember, any textures extracted and/or converted from Quake2 remain 
  43. the property of id software.
  44.  
  45.  
  46. Command-line options
  47. --------------------
  48. -?                - Lists command line options.
  49.  
  50. -pak filename     - Use specified pak file.  Can be used for custom
  51.                      pak files, or to q2towad from any location by 
  52.                      specifing a full pathname to pak0.pak.  Default 
  53.                      is "pak0.pak". (see *notes*)
  54.  
  55. -palette filename - Convert textures to specified palette (must be 
  56.                      in palette.lmp format).  Default is no new 
  57.                      palette. (see *notes*)
  58.  
  59. -wad filename     - Uses this filename for the output wad.  Default 
  60.                      is "quake2.wad".
  61.  
  62. -brights #        - Specifies number of fullbrights at the end of the
  63.                      new palette, these colors will be ignored in 
  64.                      palette conversions.  Default is 32.
  65.  
  66. -split #          - Splits the output into specified number of wads.
  67.                      Simply splits into similar-sized parts, no
  68.                      attempt is made to organize the textures in any 
  69.                      way.  Successive letters, starting with "a", are
  70.                      appended to the filename.
  71.  
  72. -dirname          - Adds Quake2 texture dir names to the texture's 
  73.                      names.  Allows most editors to use this wad to 
  74.                      compile levels for Quake2.  Default is no dir
  75.                      names.
  76.  
  77. -nogray           - Turns OFF special processing for pure gray 
  78.                      values (only use if the destination palette 
  79.                      does not contain many pure grays).  Default is 
  80.                      ON.
  81.  
  82.  
  83. * Examples *
  84.  
  85. >Q2TOWAD.EXE
  86.  
  87.    Extracts all textures into quake2.wad, no palette conversion.
  88.  
  89. >Q2TOWAD.EXE -palette palette.lmp
  90.  
  91.    Extracts all textures into quake2.wad, converting them to the 
  92.    new palette. (see *notes*)
  93.  
  94. >Q2TOWAD.EXE -split 5 -wad Q2.wad
  95.  
  96.    Extracts textures into 5 wads: Q2a.wad, Q2b.wad, Q2c,wad, 
  97.    Q2d.wad, and Q2e.wad, no palette conversion.
  98.  
  99. >Q2TOWAD.EXE -dirname
  100.  
  101.    Extracts textures into quake2.wad, includes the Quake2 texture 
  102.    dir names on the textures, no palette conversion.
  103.  
  104. >Q2TOWAD.EXE -pak mypak.pak -wad mywad.wad
  105.  
  106.    Extracts textures from mypak.pak into mywad.wad, no palette 
  107.    conversion.
  108.  
  109.  
  110. * Notes *
  111.  
  112. For palette conversions you need to use a pak utility to extract the 
  113. "palette.lmp" from the (Quake, Hexen2, etc) pak.  Put this in the 
  114. same dir with the q2towad files and use the -palette command line 
  115. option.
  116.  
  117. For custom paks, be sure texture dir names are included in the wal 
  118. files themselves (like Quake2).  Also, keep the total 
  119. dirname/texturename length 16 characters or less, or they will be 
  120. truncated and possibly made unusable.
  121.  
  122.  
  123. * Technical *
  124.  
  125. For the curious...  
  126.  
  127. Pak file operations are done in-place, relatively little is loaded 
  128. into memory at a time.  Considering the size of the Quake2 pak, this 
  129. is a very good thing. ;)
  130.  
  131. To convert to other palettes, I used a basic nearest-color-matching 
  132. algorithm.  Distance ties are broken by examining the difference in 
  133. green values, then if still tied examining the difference in red 
  134. values, then if still tied examining the difference in blue values, 
  135. then if still tied it picks the brighter color.  Also, by default, 
  136. pure grays are only remapped to other pure grays (this can be turned 
  137. off with command-line option: -nogray).
  138.  
  139. To eliminate duplicates, I first check for duplicate names (without
  140. the Quake2 directory), then I do a CRC32 check on that.  I do this 
  141. because Quake2 has some textures with the same name, but the textures 
  142. themselves are different.  If it's a different texture, and -dirname
  143. isn't used, then I append a "_" to the texture name so editors wont
  144. get confused.
  145.  
  146. =====================================================================
  147. * History *
  148.  
  149. Version 1.3 (Jan 25, 1998):
  150.    * added support for custom pak files
  151.    * fixed version number error in output header :}
  152.  
  153. Version 1.2 (Dec 16, 1997):
  154.    * added -split command line option
  155.  
  156. Version 1.1:
  157.    * added -dirname command line option
  158.    * added CRC checking to duplicate texture removing formula
  159.  
  160. Version 1.0 (Dec 9, 1997):
  161.    * first official release
  162.  
  163. =====================================================================
  164. * Construction *
  165.  
  166. Compiler used           : Microsoft VC++ 4.0
  167. Construction time       : Couple hours a day for a couple days?
  168. Known Issues            : ?
  169.  
  170. =====================================================================
  171. * Copyright / Permissions *
  172.  
  173. Any textures extracted and/or converted from Quake2 remain the 
  174. property of id software.
  175.  
  176. You MAY distribute this EXE, provided you include this file, with no
  177. modifications.  You may distribute this file in any electronic format
  178. (BBS, Diskette, CD, etc.) as long as you include this file intact.
  179.  
  180. * Disclaimer *
  181.  
  182. Usage of Q2toWad is at your own risk.  I accept NO responsibility
  183. for any form of damage incurred through the usage of this program.
  184.  
  185. =====================================================================
  186. * Where to get this Utility *
  187.  
  188. ftp://ftp.cdrom.com/pub/quake2/utils/graphics_edit/texture_utils/
  189.    q2towad.zip 
  190. (or http://www.cdrom.com...; and all mirrors)
  191.  
  192.